home *** CD-ROM | disk | FTP | other *** search
- // ===============================================================
- // Vertex Program:
- // Description:
- // Last Update: 14/08/2003
- // Coder: Andrey Honich
- // ===============================================================
-
- #include "../CGVPMacro.csi"
-
-
- MainInput { VIEWPROJ_MATRIX, CAMERA_POS, uniform float4 TCModifiers }
- DeclarationsScript
- {
- IN_T0_N
- OUT_T0_T1
- }
- PositionScript = PosCommon
- CoreScript
- {
- float3 vEyeDir = normalize(CameraPos.xyz - IN.Position.xyz);
- float fDot = dot(vEyeDir.xyz, IN.Normal.xyz);
-
- OUT.Tex0.x = fDot + TCModifiers.x;
- }
-